home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection 1998 Fall: Game Toolkit / Disc.iso / SDKs / Apple Game Sprockets / NetSprocket / NewNSpTest Sources / Proto.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-09-18  |  4.1 KB  |  130 lines  |  [TEXT/CWIE]

  1. /*************************************************************************************
  2. #
  3. #        Proto.h
  4. #
  5. #        This file contains the prototypes for the apps procs and funcs
  6. #
  7. #        Author(s):     Michael Marinkovich
  8. #                    Apple Developer Technical Support
  9. #                    marink@apple.com
  10. #
  11. #        Modification History: 
  12. #
  13. #            2/10/96        MWM     Initial coding                     
  14. #
  15. #        Copyright © 1992-96 Apple Computer, Inc., All Rights Reserved
  16. #
  17. #
  18. #        You may incorporate this sample code into your applications without
  19. #        restriction, though the sample code has been provided "AS IS" and the
  20. #        responsibility for its operation is 100% yours.  However, what you are
  21. #        not permitted to do is to redistribute the source as "DSC Sample Code"
  22. #        after having made changes. If you're going to re-distribute the source,
  23. #        we require that you make it clear in the source that the code was
  24. #        descended from Apple Sample Code, but that you've made changes.
  25. #
  26. *************************************************************************************/
  27. #include <AppleEvents.h>
  28. #include "app.h"
  29.  
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33. //----------------------------------------------------------------------
  34. //
  35. //    Aevt
  36. //
  37. //----------------------------------------------------------------------
  38.  
  39. OSErr             AEInit(void);
  40. OSErr            AERemove(void);
  41. pascal OSErr    DoAEOpenApp(AppleEvent *event,AppleEvent reply,long refCon);
  42. pascal OSErr    DoAEQuitApp(AppleEvent *event,AppleEvent reply,long refCon);
  43. pascal OSErr    DoAEOpenDoc(AppleEvent *event,AppleEvent reply,long refCon);
  44. pascal OSErr    DoAEPrintDoc(AppleEvent *event,AppleEvent reply,long refCon);
  45. OSErr             GotAEParams(AppleEvent *appleEvent);
  46.  
  47.  
  48. //----------------------------------------------------------------------
  49. //
  50. //    Initialize
  51. //
  52. //----------------------------------------------------------------------
  53.  
  54. OSErr            Initialize(void);
  55. void            ToolBoxInit(void);
  56. void             CheckEnvironment(void);
  57. OSErr             InitApp(void);
  58. void             MenuSetup(void);
  59.  
  60.  
  61. //----------------------------------------------------------------------
  62. //
  63. //    Main
  64. //
  65. //----------------------------------------------------------------------
  66.  
  67.  
  68. void             HandleError(short errNo,Boolean fatal);
  69. void             HandleAlert(short alertID);
  70.  
  71.  
  72. //----------------------------------------------------------------------
  73. //
  74. //    Events
  75. //
  76. //----------------------------------------------------------------------
  77.  
  78. void            EventLoop(void);
  79. short             MyGetSleep(void);
  80. void             CustomWindowEvent(short eventType,WindowRef window,void *refCon);
  81. void             DoEvent(EventRecord *event);
  82. void             DoIdle(WindowRef window, void *refCon);
  83. void             HandleMouseDown(EventRecord *event);
  84. void             HandleMenuChoice(WindowRef window, void *refCon);
  85. void             AdjustMainMenus(void);
  86. void            HandleContentClick(WindowRef window, void *refCon);
  87. void             HandleZoomClick(WindowRef window, void *refCon);
  88. void             HandleGrow(WindowRef window, void *refCon);
  89. void             UpdateWindow(WindowRef window);
  90. void             DoActivate(WindowRef window, void *refCon);
  91.  
  92.  
  93. //----------------------------------------------------------------------
  94. //
  95. //    Windows
  96. //
  97. //----------------------------------------------------------------------
  98.  
  99. WindowPtr         CreateWindow(short resID, void *wStorage, Rect *bounds, Str255 title,
  100.                             Boolean visible, short procID,short kind, WindowRef behind,
  101.                             Boolean goAwayFlag,long refCon);
  102. OSErr             RemoveWindow(WindowRef window);
  103. void             DisposeWindowStructure(DocHnd doc);
  104. void             NewWindowTitle(WindowRef window, Str255 str);
  105. OSErr             InitWindowProcs(WindowRef window, short windKind);
  106. void            DrawWindow( WindowRef window, void *refCon );
  107. void             DrawAboutWindow( WindowRef window, void *refCon );
  108. void             DoResizeWindow (WindowRef window);
  109. short             GetWindKind(WindowRef window);
  110. Boolean            GetIsAppWindow(WindowRef window);
  111. Boolean         GetIsAboutWindow( WindowRef window );
  112.  
  113. #if 0
  114.  
  115. //----------------------------------------------------------------------
  116. //
  117. //    Utils
  118. //
  119. //----------------------------------------------------------------------
  120.  
  121. OSErr             PictToWorld(PicHandle pict, short depth, GWorldPtr *theWorld);
  122. void            ZeroRect(Rect *r);
  123. void             pstrcpy(StringPtr dst, StringPtr src);
  124. void             pstrcat(StringPtr dst, StringPtr src);        
  125.  
  126. #endif
  127.  
  128. #ifdef __cplusplus
  129. }
  130. #endif